package com.yxd.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxd.demo.domain.Rule;
import com.yxd.demo.mapper.RuleMapper;
import com.yxd.demo.service.RuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: yxd
 * @date: 2022/8/1 9:40
 */
@Service
public class RuleServiceImpl extends ServiceImpl<RuleMapper, Rule> implements RuleService {
    @Autowired
    private RuleMapper ruleMapper;

    @Override
    public boolean insert(Rule rule) {
        return super.save(rule);
    }

    @Override
    public Rule queryById(Long ruleId) {
        return super.getById(ruleId);
    }

    @Override
    public List<Rule> queryByIds(List<Long> ruleIds) {
        return ruleMapper.queryByIds(ruleIds);
    }

    @Override
    public List<Rule> queryAll() {
        return ruleMapper.queryAll();
    }
}
